﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// DevRouteRelation数据模型对象
    /// </summary>
    [Serializable]
    public partial class DevRouteRelationMod
    {
        /// <summary>
        /// 初始化DevRouteRelation数据模型对象
        /// </summary>
        public DevRouteRelationMod()
        {
            
        }
        /// <summary>
        /// 初始化DevRouteRelation数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="rKey">RKey</param>
        /// <param name="deviceNo">DeviceNo</param>
        /// <param name="regionID">RegionID</param>
        /// <param name="startTime">StartTime</param>
        /// <param name="endTime">EndTime</param>
        /// <param name="ctime">ctime</param>
        public DevRouteRelationMod(string rKey,string deviceNo,string regionID,string startTime,string endTime,DateTime ctime)
        {
            //给RKey字段赋值
            this.RKey = rKey;
            //给DeviceNo字段赋值
            this.DeviceNo = deviceNo;
            //给RegionID字段赋值
            this.RegionID = regionID;
            //给StartTime字段赋值
            this.StartTime = startTime;
            //给EndTime字段赋值
            this.EndTime = endTime;
            //给ctime字段赋值
            this.Ctime = ctime;
        }
        
		//属性存储数据的变量
        private string _rKey;
        private string _deviceNo;
        private string _regionID;
        private string _startTime;
        private string _endTime;
        private DateTime _ctime;
        
        /// <summary>
        /// RKey
        /// </summary>
        public string RKey
        {
            get { return this._rKey; }
            set { this._rKey = value; }
        }
        /// <summary>
        /// DeviceNo
        /// </summary>
        public string DeviceNo
        {
            get { return this._deviceNo; }
            set { this._deviceNo = value; }
        }
        /// <summary>
        /// RegionID
        /// </summary>
        public string RegionID
        {
            get { return this._regionID; }
            set { this._regionID = value; }
        }
        /// <summary>
        /// StartTime
        /// </summary>
        public string StartTime
        {
            get { return this._startTime; }
            set { this._startTime = value; }
        }
        /// <summary>
        /// EndTime
        /// </summary>
        public string EndTime
        {
            get { return this._endTime; }
            set { this._endTime = value; }
        }
        /// <summary>
        /// ctime
        /// </summary>
        public DateTime Ctime
        {
            get { return this._ctime; }
            set { this._ctime = value; }
        }
        
        /// <summary>
        /// 对比两个DevRouteRelation数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的DevRouteRelation数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成DevRouteRelation数据模型对象
            DevRouteRelationMod devRouteRelationMod = obj as DevRouteRelationMod;
            //判断是否转换成功
            if (devRouteRelationMod == null) return false;
            //进行匹配属性的值
            return
                //判断RKey是否一致
                this.RKey == devRouteRelationMod.RKey &&
                //判断DeviceNo是否一致
                this.DeviceNo == devRouteRelationMod.DeviceNo &&
                //判断RegionID是否一致
                this.RegionID == devRouteRelationMod.RegionID &&
                //判断StartTime是否一致
                this.StartTime == devRouteRelationMod.StartTime &&
                //判断EndTime是否一致
                this.EndTime == devRouteRelationMod.EndTime &&
                //判断ctime是否一致
                this.Ctime == devRouteRelationMod.Ctime;
        }
        /// <summary>
        /// 将当前DevRouteRelation数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将DevRouteRelation数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将RKey进行按位异或运算处理
                (this.RKey == null ? 2147483647 : this.RKey.GetHashCode()) ^
                //将DeviceNo进行按位异或运算处理
                (this.DeviceNo == null ? 2147483647 : this.DeviceNo.GetHashCode()) ^
                //将RegionID进行按位异或运算处理
                (this.RegionID == null ? 2147483647 : this.RegionID.GetHashCode()) ^
                //将StartTime进行按位异或运算处理
                (this.StartTime == null ? 2147483647 : this.StartTime.GetHashCode()) ^
                //将EndTime进行按位异或运算处理
                (this.EndTime == null ? 2147483647 : this.EndTime.GetHashCode()) ^
                //将ctime进行按位异或运算处理
                this.Ctime.GetHashCode();
        }
        /// <summary>
        /// 将当前DevRouteRelation数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前DevRouteRelation数据模型对象转换成字符串副本
            return
                "[" +
                //将RKey转换成字符串
                this.RKey + "," +
                //将DeviceNo转换成字符串
                this.DeviceNo + "," +
                //将RegionID转换成字符串
                this.RegionID + "," +
                //将StartTime转换成字符串
                this.StartTime + "," +
                //将EndTime转换成字符串
                this.EndTime + "," +
                //将ctime转换成字符串
                this.Ctime +
                "]";
        }
    }
}
